package com.open.center.common.constant;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import com.open.center.common.databind.JsonEnumDeserializer;
import com.open.center.common.databind.JsonEnumSerializer;


/**
 * 枚举类基类
 *
 * @author Riche's
 * @since 2025/5/23
 */
// 若使用自定义序列化器，@JsonValue注解将会失效
@JsonSerialize(using = JsonEnumSerializer.class)
@JsonDeserialize(using = JsonEnumDeserializer.class)
public interface Enumerator<E extends Enum<?>, T> {

    T getId();

    String getName();

}
